<?php
header("Content-Type: text/html; charset=iso-8859-1");

?>
<script type="text/javascript" src="js/form.js"></script>
<script type="text/javascript" src="../Lib/js/prototype.js"></script>
<table width="690" border="0" align="center" cellpadding="3" cellspacing="3" class="datos cuadro">
<tr align="left" bgcolor="#F8B145">
  <td bgcolor="#FFFFFF"><strong>PAIS</strong></td>
  <td bgcolor="#FFFFFF"><strong>CIUDAD</strong></td>
  <td bgcolor="#FFFFFF"><strong>MUNICIPIO</strong></td>
   <td bgcolor="#FFFFFF"><strong>Eliminar</strong></td>
  </tr>

<?php

$sql="select * from aux_viajes where id_principal = $id_principal";
$qry = mssql_query($sql,$link) or die(mssql_get_last_message());
	
	while($web = mssql_fetch_array($qry)){


		$fondo = ($fondo=="#f3f3f3"?"#FFFFFF":"#f3f3f3");
		echo "<tr align='left' bgcolor='$fondo'> <td >".catalogo($web["nPais"], 'Cat_Paises', 'upper(pais)', 'id_paises',$link)."</td><td bgcolor='$fopndo' >";
		if(!$web["cCiudad"] == ''){
		echo $web[3];
		}else{
		
		echo catalogo($web["nCiudad"], 'catalogos.dbo.entidades_inegi', 'upper(cNentidad)','id_principal',$link);
		}
		echo "</td><td bgcolor='$fopndo' >".catalogo($web["nMunicipioV"], 'catalogos.dbo.municipios_inegi', 'UPPER(cNmunicipio)', 'id_principal',$link)."</td><td bgcolor='$fopndo' >"; ?>
        <a href="#" onclick="ligadeviajes('elimv.php?id_viajes=<?php echo $web["id_viajes"]; ?>','resultadoviajes','<?php echo $id_principal; ?>')"><img src="images/b_drop.png" alt="Eliminar" width="16" height="16" border="0" /></a>
        
        <?php
		echo "</td> </tr>";
		}	
		?>
</table>
